package com.dr.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dr.entity.Shopcart;
import com.dr.mapper.ShopcartMapper;
import com.dr.service.ShopcartService;
@Service
@Transactional
public class ShopcartServiceImpl implements ShopcartService {
    @Autowired
    private  ShopcartMapper shopcartMapper;
   
	@Override
	public List<Shopcart> findShopcarts(Integer id) {
		// TODO Auto-generated method stub
		return shopcartMapper.findShopcarts(id);
	}

	@Override
	public int deleteShopcart(String ids) {
		// TODO Auto-generated method stub
		return shopcartMapper.deleteShopcart(ids);
	}

	

	@Override
	public int updateCount(Integer id, String option) {
		// TODO Auto-generated method stub
		return shopcartMapper.updateCount(id, option);
	}

	@Override
	public Shopcart findISSamePro(Integer pid, Integer uid, String size) {
		// TODO Auto-generated method stub
		return shopcartMapper.findISSamePro(pid, uid, size);
	}

	@Override
	public int addShopcartByUpdateCount(Integer id, Integer count) {
		// TODO Auto-generated method stub
		return shopcartMapper.addShopcartByUpdateCount(id, count);
	}

	@Override
	public int addShopcart(Shopcart shopcart) {
		// TODO Auto-generated method stub
		return shopcartMapper.addShopcart(shopcart);
	}

	
	
	
}
